#include <iostream>

#include <sfif/sfif_ringbuffer.hh>

#define SIZE 10

int main(int argc, char **argv) {
  sfif_RingBuffer<int,SIZE> cb;
  int value = 0;
  
  /* Fill buffer with test elements 3 times */
  for (int i = 0; i < cb.getSize(); ++i){
    value = rand()%(SIZE*SIZE);
    cb.write(&value);
  }
 
    /* Remove and print all elements */
    while (!cb.empty()) {
        cb.read(&value);
        std::cout << value << std::endl;
    }
 
    return 0;
}
